package com.javase;
/**
 * =====构造器练习
*/
public class ConstructorExercise {
    public static void main(String[] args) {
        Person03 p1 = new Person03();
        Person03 p2 = new Person03("benz",60);
        System.out.println(p1.name+" "+p1.age);
        System.out.println(p2.name+" "+p2.age);
    }
}

class Person03{
    String name;
    int age;
    Person03(){
        age = 18;
    }
    public Person03(String pName,int pAge){
        name = pName;
        age = pAge;
    }
}